#pragma once

#include <QtWidgets/QWidget>
#include "ui_DesktopRecorder.h"
#include <QLayout>
#include "DuplicationThread.h"
#include "Encoder.h"
#include "VideoFrameReceiver.h"

class DesktopRecorder : public QWidget
{
    Q_OBJECT

public:
    DesktopRecorder(QWidget *parent = Q_NULLPTR);
	~DesktopRecorder();

public slots:
    void RecordButtonClicked();

private slots:
    void OutputResized(QSize size);
    
    void EchoIdleProc();

private:
    int StartRecord();
    void StopRecord();

    Ui::DesktopRecorderClass ui;
	DuplicationThread m_dupThread;
    Encoder m_encoder;
    VideoFrameReceiver m_videoFrameReceiver;
};
